<template>
	<view>
		<view class="container">
			<view class="row list-item" @click="navTo(isPhone?'/pages/user/my-setting/account-security/update-pwd':'/pages/user/my-setting/account-security/set-Password')">
				<text style="font-size: 36rpx;">{{isPhone?'修改密码':'设置密码'}}</text>
				<view class="" style="width: 30rpx;height: 30rpx;margin-left: auto;">
					<zywork-icon type="icon-youjiantou1" size="30" color="#afafaf "></zywork-icon>
				</view>
			</view>
			<view class="row list-item" @click="navTo('/pages/user/my-setting/account-security/logout-Account')">
				<text style="font-size: 36rpx;">注销账号</text>
				<text style="color: #a7a7a7;margin-left: auto;margin-right: 50rpx;">注销后无法恢复,请谨慎操作</text>
				<view class="" style="width: 30rpx;height: 30rpx;right: 0rpx;">
					<zywork-icon type="icon-youjiantou1" size="30" color="#afafaf "></zywork-icon>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isPhone:false
			};
		},
		onShow() {
			this.$util.doGet('/user/isPassword', {}, {}, true).then(res => {
				console.log(res.data.data)
				if(res.data.code == this.$ResponseStatus.OK){
					this.isPhone = res.data.data
				}
			}).catch(error => {
				console.log(error)
			})
		},
		methods:{
			navTo(url){
				uni.navigateTo({
					url:url
				})
			},
		}
	}
</script>

<style lang="scss">
	.container{
		padding: 20rpx 30rpx;
		.list-item{
			padding: 30rpx 0rpx;
			border-bottom: solid 1rpx #eee;
			align-items: center;
		}
	}
</style>
